package edu.suda.LoopCodePlus.mapper;

import edu.suda.LoopCodePlus.entity.SubmissionRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SubmissionRecordMapper {
    /** 插入新的记录 */
    void insertSubmissionRecord(SubmissionRecord submissionRecord);
    /** 根据竞赛id和用户id查询 */
    List<SubmissionRecord> select_SubmissionRecordByComIdAndUserId(@Param("comId") Integer comId, @Param("userId") Integer userId);
    /** 根据用户id查询 */
    List<SubmissionRecord> select_SubmissionRecordByUserId(Integer userId);
    /** 根据题目id和用户id查询 */
    List<SubmissionRecord> select_SubmissionRecordByProblemIdAndUserId(@Param("problemId") Integer problemId, @Param("userId") Integer userId);
}
